package com.ck.common;

import lombok.extern.slf4j.Slf4j;

/**
 * @author ck
 */
@Slf4j
public abstract class BaseTask  {

    /**
     * 打印JOB开始时间
     */
    protected long taskStart() {
        log.info(this + " taskStart");
        return System.currentTimeMillis();
    }

    /**
     * 打印JOB结束时间
     */
    protected void taskEnd(long startTime) {
        long endTime = System.currentTimeMillis();
        log.info(this + " taskEnd,耗时:" + (endTime - startTime) / 1000.0 + "秒");
    }
}
